/* 
 * This javascript file is necessary for the functioning of the theme
 */

$(document).ready(function () {

    $('.action').val("");

    $('.action').bind('change', function () {
        var url = $(this).val();
        if (url) {
            if (url.indexOf("Delete") != -1) {
                if (confirm("Realmente desea Borrar este registro?")) {
                    window.location = url;
                } else {
                    $(this).val("");
                }
            } else {
                window.location = url;
            }
        }
        return false;
    });

    $("ul.sf-menu").superfish({
        delay: 500,
        animation: {
            opacity: 'show',
            height: 'show'
        }
    });

    $('.datatables').dataTable({
        "sPaginationType": "full_numbers",
        "bJQueryUI": true
    });

    $("#loginarrow").click(function () {
        $("#logindrop").toggle("slow");
        return false;
    });

    $(".notification").click(function () {
        $(this).fadeOut("slow");
    });
});